<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<c:set var="path" value="..${ctx}/base/power/group"/>

<div class="pageContent">
	<form method="post" action="${path}/save.html" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="56">
			<fieldset>
				<dl>
					<dt>工作组编号：</dt>
					<dd><input name="id" type="text" size="30" value="${group.id}" readonly="readonly"/>
						<input name="parentID" type="hidden" value="${parent.id}" />
					</dd>
				</dl>
				<dl>
					<dt>工作组名称：</dt>
					<dd><input name="text" type="text" size="30" value="${group.text}" class="required" /></dd>
				</dl>
				<dl>
					<dt>工作组代码：</dt>
					<dd><input name="code" type="text" size="30" value="${group.code}" /></dd>
				</dl>
			</fieldset>
		</div>
		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" >保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
/**
 * dialog上的表单提交回调函数
 * 服务器转回navTabId，可以重新载入指定的navTab. statusCode=DWZ.statusCode.ok表示操作成功, 自动关闭当前dialog
 *
 * form提交后返回json数据结构,json格式和navTabAjaxDone一致
 */

function dialogAjaxDone(json){
	DWZ.ajaxDone(json);
	if (json.statusCode == DWZ.statusCode.ok){
		// alert(json.callbackType);
		if(json.callbackType){
			navTab.reload("${path}/list.html");//刷新
			setTimeout(function(){$.pdialog.closeCurrent();}, 100);
		}
	}
}

</script>